package com.weixing.mall.provider.controller.rpc;

import com.weixing.mall.base.wrapper.Result;
import com.weixing.mall.base.wrapper.ResultUtil;
import com.weixing.mall.core.support.BaseController;
import com.weixing.mall.provider.api.model.vo.DeliveryAddressVo;
import com.weixing.mall.provider.service.IDeliveryAddressService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author wx
 * @Date 2019/12/16 11:57
 * @Version 1.0
 */
@RestController
@RequestMapping("/api/deliveryAddress")
public class DeliveryAddressRpcController extends BaseController {
    @Autowired
    private IDeliveryAddressService deliveryAddressService;

    @GetMapping("getById")
    public Result<DeliveryAddressVo> getById(Long addrId){
        return ResultUtil.success(deliveryAddressService.selectDetail(addrId));
    }
}
